 
 const  {ref,computed} = Vue
 
 export default {

			setup() {

				// const scoreMap = ['','差评','较差','中等','一般','好评']
				const scoreMap = new Map()

				// ['','差评','较差','中等','一般','好评']

				scoreMap.set(0, '')
				scoreMap.set(1, '差评')
				scoreMap.set(2, '较差')
				scoreMap.set(3, '中等')
				scoreMap.set(4, '一般')
				scoreMap.set(5, '好评')



				let score = ref(0); //  0星    作为记录
				let tem_score = ref(0)

				function tap(num) {
					score.value = num
					tem_score.value = num
				}

				function over(num) {
					tem_score.value = Math.max(score.value, num)

				}

				const scoreTips = computed(function() {
					// return scoreMap[tem_score.value]
					return scoreMap.get(tem_score.value)
				})

				function out() {
					tem_score.value = score.value
				}
				return {
					score,
					tem_score,
					tap,
					over,
					out,
					scoreTips
				}

			},
			template: `#star`

		}